<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
    <style>
        .pigover {
            border-radius: 8px;
            width: 300px;
            height: auto;
        }
        .bos{
            border: 2px solid #333;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        }
    </style>
<body>
    <!-- https://upload-bbs.miyoushe.com/upload/2024/02/21/166581139/168377210a76b01b15f83e231d676d48_2564000400010500603.jpg -->
    <div id="app">
        <h1>{{msg}}</h1>
        <!-- <img src="https://tse2-mm.cn.bing.net/th/id/OIP-C.tDAdB-O3aT80KuQyjlMc6wAAAA?rs=1&pid=ImgDetMain"/> -->
         <img :src="url" @mouseover="changeUrlOver" @mouseout="changeUrlOut" :title="titleMessage" :class="{pigover:showCss,bos:showBos}"/>
    </div>
</body>
</html>
<script>
    new Vue({
        el:'#app',
        data:{
            msg:'你好',
            url:'https://tse2-mm.cn.bing.net/th/id/OIP-C.tDAdB-O3aT80KuQyjlMc6wAAAA?rs=1&pid=ImgDetMain',
            titleMessage:'流萤酱真可爱',
            pigover:"",
            showCss:true,
            showBos:false
        },
        methods: {
            changeUrlOver(){
                this.url = 'https://upload-bbs.miyoushe.com/upload/2024/02/21/166581139/168377210a76b01b15f83e231d676d48_2564000400010500603.jpg'
                this.titleMessage = '流萤酱还是可爱'
                this.pigover = "pigover"
                this.showBos = true
            },
            changeUrlOut(){
                this.url = 'https://tse2-mm.cn.bing.net/th/id/OIP-C.tDAdB-O3aT80KuQyjlMc6wAAAA?rs=1&pid=ImgDetMain'
                this.titleMessage = '流萤酱真可爱'
                this.pigover = ""
                this.showBos = false
            }
        },
    })
</script>